package com.cxyjy.common.constants;

import com.cxyjy.common.util.JRequestUtil;

import java.net.MalformedURLException;
import java.net.URL;

public final class CfyuiConstants {
    //部署在内网要用内网的comfy ui路径，这是公网的
    //    public static final String COMFYUI_URL_STR = "http://218.77.58.8:8501";
//    public static final String COMFYUI_URL_STR = "http://192.168.88.8:18501";
    public static String COMFYUI_URL_STR = "http://" + JRequestUtil.detectComfyUIHost();
    public static final String WEBSOCKET_URL_STR = "ws" + COMFYUI_URL_STR.substring(4) + "/ws";
    public static final String VERIFICATION_CODE = "YANZHENGMA";
    public static final URL UPLOAD_IMAGE_URL;
    public static final URL HISTORY_URL;
    public static final URL PROMPT_URL;
    public static final URL VIEW_URL ;
    public static final URL INTERRUPT_URL;
    public static final URL QUEUE_URL;
    //f5-tts在内网的url
    public static final URL F5TTS_URL;
    public static final URL DOWNLOAD_URL;

    static {
        try {
            UPLOAD_IMAGE_URL = new URL(COMFYUI_URL_STR + "/upload/image");
            PROMPT_URL = new URL(COMFYUI_URL_STR + "/prompt");
//            VIEW_URL = new URL(COMFYUI_URL_STR + "/view");
            VIEW_URL = new URL("http://117.157.192.95:8082/comfyuiview");
            HISTORY_URL = new URL(COMFYUI_URL_STR + "/history");
            INTERRUPT_URL = new URL(COMFYUI_URL_STR + "/interrupt");
            QUEUE_URL = new URL(COMFYUI_URL_STR + "/queue");
            F5TTS_URL = new URL("http://192.168.88.8:5010/api");
            DOWNLOAD_URL = new URL(COMFYUI_URL_STR + "/view");
        } catch (MalformedURLException e) {
            throw new RuntimeException(e);
        }
    }
    //标准视频换脸工作流json
    public static final String VEDIO_FACESWAP_DATA = "{\"client_id\":\"default\",\"prompt\":{\"1\":{\"inputs\":{\"enabled\":true,\"swap_model\":\"inswapper_128.onnx\",\"facedetection\":\"retinaface_resnet50\",\"face_restore_model\":\"GFPGANv1.4.pth\",\"face_restore_visibility\":1,\"codeformer_weight\":0.5,\"detect_gender_input\":\"no\",\"detect_gender_source\":\"no\",\"input_faces_index\":\"0\",\"source_faces_index\":\"0\",\"console_log_level\":1,\"input_image\":[\"9\",0],\"source_image\":[\"2\",0]},\"class_type\":\"ReActorFaceSwap\",\"_meta\":{\"title\":\"ReActor换脸\"}},\"2\":{\"inputs\":{\"image\":\"default\",\"upload\":\"image\"},\"class_type\":\"LoadImage\",\"_meta\":{\"title\":\"加载图像\"}},\"9\":{\"inputs\":{\"video\":\"man_faceswap_clip_1.mp4\",\"force_rate\":0,\"force_size\":\"Disabled\",\"custom_width\":512,\"custom_height\":512,\"frame_load_cap\":0,\"skip_first_frames\":0,\"select_every_nth\":1},\"class_type\":\"VHS_LoadVideo\",\"_meta\":{\"title\":\"加载视频\"}},\"14\":{\"inputs\":{\"frame_rate\":30,\"loop_count\":0,\"filename_prefix\":\"Faceswap_1\",\"format\":\"video/h264-mp4\",\"pix_fmt\":\"yuv420p\",\"crf\":2,\"save_metadata\":true,\"pingpong\":false,\"save_output\":true,\"images\":[\"1\",0]},\"class_type\":\"VHS_VideoCombine\",\"_meta\":{\"title\":\"合并为视频\"}},\"52\":{\"inputs\":{\"video\":\"man_faceswap_clip_2.mp4\",\"force_rate\":0,\"force_size\":\"Disabled\",\"custom_width\":512,\"custom_height\":512,\"frame_load_cap\":0,\"skip_first_frames\":0,\"select_every_nth\":1},\"class_type\":\"VHS_LoadVideo\",\"_meta\":{\"title\":\"加载视频\"}},\"53\":{\"inputs\":{\"enabled\":true,\"swap_model\":\"inswapper_128.onnx\",\"facedetection\":\"retinaface_resnet50\",\"face_restore_model\":\"GFPGANv1.4.pth\",\"face_restore_visibility\":1,\"codeformer_weight\":0.5,\"detect_gender_input\":\"no\",\"detect_gender_source\":\"no\",\"input_faces_index\":\"0\",\"source_faces_index\":\"0\",\"console_log_level\":1,\"input_image\":[\"52\",0],\"source_image\":[\"2\",0]},\"class_type\":\"ReActorFaceSwap\",\"_meta\":{\"title\":\"ReActor换脸\"}},\"54\":{\"inputs\":{\"frame_rate\":30,\"loop_count\":0,\"filename_prefix\":\"Faceswap_2\",\"format\":\"video/h264-mp4\",\"pix_fmt\":\"yuv420p\",\"crf\":2,\"save_metadata\":true,\"pingpong\":false,\"save_output\":true,\"images\":[\"53\",0]},\"class_type\":\"VHS_VideoCombine\",\"_meta\":{\"title\":\"合并为视频\"}},\"55\":{\"inputs\":{\"video\":\"man_faceswap_clip_3.mp4\",\"force_rate\":0,\"force_size\":\"Disabled\",\"custom_width\":512,\"custom_height\":512,\"frame_load_cap\":0,\"skip_first_frames\":0,\"select_every_nth\":1},\"class_type\":\"VHS_LoadVideo\",\"_meta\":{\"title\":\"加载视频\"}},\"56\":{\"inputs\":{\"enabled\":true,\"swap_model\":\"inswapper_128.onnx\",\"facedetection\":\"retinaface_resnet50\",\"face_restore_model\":\"GFPGANv1.4.pth\",\"face_restore_visibility\":1,\"codeformer_weight\":0.5,\"detect_gender_input\":\"no\",\"detect_gender_source\":\"no\",\"input_faces_index\":\"0\",\"source_faces_index\":\"0\",\"console_log_level\":1,\"input_image\":[\"55\",0],\"source_image\":[\"2\",0]},\"class_type\":\"ReActorFaceSwap\",\"_meta\":{\"title\":\"ReActor换脸\"}},\"57\":{\"inputs\":{\"frame_rate\":30,\"loop_count\":0,\"filename_prefix\":\"Faceswap_3\",\"format\":\"video/h264-mp4\",\"pix_fmt\":\"yuv420p\",\"crf\":2,\"save_metadata\":true,\"pingpong\":false,\"save_output\":true,\"images\":[\"56\",0]},\"class_type\":\"VHS_VideoCombine\",\"_meta\":{\"title\":\"合并为视频\"}},\"59\":{\"inputs\":{\"video\":\"man_faceswap_clip_4.mp4\",\"force_rate\":0,\"force_size\":\"Disabled\",\"custom_width\":512,\"custom_height\":512,\"frame_load_cap\":0,\"skip_first_frames\":0,\"select_every_nth\":1},\"class_type\":\"VHS_LoadVideo\",\"_meta\":{\"title\":\"加载视频\"}},\"60\":{\"inputs\":{\"enabled\":true,\"swap_model\":\"inswapper_128.onnx\",\"facedetection\":\"retinaface_resnet50\",\"face_restore_model\":\"GFPGANv1.4.pth\",\"face_restore_visibility\":1,\"codeformer_weight\":0.5,\"detect_gender_input\":\"no\",\"detect_gender_source\":\"no\",\"input_faces_index\":\"0\",\"source_faces_index\":\"0\",\"console_log_level\":1,\"input_image\":[\"59\",0],\"source_image\":[\"2\",0]},\"class_type\":\"ReActorFaceSwap\",\"_meta\":{\"title\":\"ReActor换脸\"}},\"61\":{\"inputs\":{\"frame_rate\":30,\"loop_count\":0,\"filename_prefix\":\"Faceswap_4\",\"format\":\"video/h264-mp4\",\"pix_fmt\":\"yuv420p\",\"crf\":2,\"save_metadata\":true,\"pingpong\":false,\"save_output\":true,\"images\":[\"60\",0]},\"class_type\":\"VHS_VideoCombine\",\"_meta\":{\"title\":\"合并为视频\"}},\"70\":{\"inputs\":{\"output\":\"\",\"source\":[\"112\",0]},\"class_type\":\"Display Any (rgthree)\",\"_meta\":{\"title\":\"Display Any (rgthree)\"}},\"82\":{\"inputs\":{\"video1_path\":\"/home/ccran/ComfyUI/input/Fixed_1.mp4\",\"video2_path\":[\"112\",0],\"device\":\"cpu\",\"resolution_reference\":\"video1\",\"output_path\":\"/home/ccran/ComfyUI/output\"},\"class_type\":\"MergingVideoByTwo\",\"_meta\":{\"title\":\"\\uD83D\\uDD25MergingVideoByTwo\"}},\"83\":{\"inputs\":{\"output\":\"\",\"source\":[\"82\",0]},\"class_type\":\"Display Any (rgthree)\",\"_meta\":{\"title\":\"Display Any (rgthree)\"}},\"85\":{\"inputs\":{\"output\":\"\",\"source\":[\"113\",0]},\"class_type\":\"Display Any (rgthree)\",\"_meta\":{\"title\":\"Display Any (rgthree)\"}},\"86\":{\"inputs\":{\"video1_path\":\"/home/ccran/ComfyUI/input/Fixed_2.mp4\",\"video2_path\":[\"113\",0],\"device\":\"cpu\",\"resolution_reference\":\"video1\",\"output_path\":\"/home/ccran/ComfyUI/output\"},\"class_type\":\"MergingVideoByTwo\",\"_meta\":{\"title\":\"\\uD83D\\uDD25MergingVideoByTwo\"}},\"87\":{\"inputs\":{\"output\":\"\",\"source\":[\"86\",0]},\"class_type\":\"Display Any (rgthree)\",\"_meta\":{\"title\":\"Display Any (rgthree)\"}},\"89\":{\"inputs\":{\"output\":\"\",\"source\":[\"114\",0]},\"class_type\":\"Display Any (rgthree)\",\"_meta\":{\"title\":\"Display Any (rgthree)\"}},\"90\":{\"inputs\":{\"video1_path\":\"/home/ccran/ComfyUI/input/Fixed_3.mp4\",\"video2_path\":[\"114\",0],\"device\":\"cpu\",\"resolution_reference\":\"video1\",\"output_path\":\"/home/ccran/ComfyUI/output\"},\"class_type\":\"MergingVideoByTwo\",\"_meta\":{\"title\":\"\\uD83D\\uDD25MergingVideoByTwo\"}},\"91\":{\"inputs\":{\"output\":\"\",\"source\":[\"90\",0]},\"class_type\":\"Display Any (rgthree)\",\"_meta\":{\"title\":\"Display Any (rgthree)\"}},\"93\":{\"inputs\":{\"output\":\"\",\"source\":[\"115\",0]},\"class_type\":\"Display Any (rgthree)\",\"_meta\":{\"title\":\"Display Any (rgthree)\"}},\"94\":{\"inputs\":{\"video1_path\":\"/home/ccran/ComfyUI/input/Fixed_4.mp4\",\"video2_path\":[\"115\",0],\"device\":\"cpu\",\"resolution_reference\":\"video1\",\"output_path\":\"/home/ccran/ComfyUI/output\"},\"class_type\":\"MergingVideoByTwo\",\"_meta\":{\"title\":\"\\uD83D\\uDD25MergingVideoByTwo\"}},\"95\":{\"inputs\":{\"output\":\"\",\"source\":[\"94\",0]},\"class_type\":\"Display Any (rgthree)\",\"_meta\":{\"title\":\"Display Any (rgthree)\"}},\"96\":{\"inputs\":{\"video1_path\":[\"94\",0],\"video2_path\":\"/home/ccran/ComfyUI/input/Fixed_5.mp4\",\"device\":\"cpu\",\"resolution_reference\":\"video1\",\"output_path\":\"/home/ccran/ComfyUI/output\"},\"class_type\":\"MergingVideoByTwo\",\"_meta\":{\"title\":\"\\uD83D\\uDD25MergingVideoByTwo\"}},\"97\":{\"inputs\":{\"video1_path\":[\"82\",0],\"video2_path\":[\"86\",0],\"device\":\"cpu\",\"resolution_reference\":\"video1\",\"output_path\":\"/home/ccran/ComfyUI/output\"},\"class_type\":\"MergingVideoByTwo\",\"_meta\":{\"title\":\"\\uD83D\\uDD25MergingVideoByTwo\"}},\"98\":{\"inputs\":{\"video1_path\":[\"90\",0],\"video2_path\":[\"96\",0],\"device\":\"cpu\",\"resolution_reference\":\"video1\",\"output_path\":\"/home/ccran/ComfyUI/output\"},\"class_type\":\"MergingVideoByTwo\",\"_meta\":{\"title\":\"\\uD83D\\uDD25MergingVideoByTwo\"}},\"99\":{\"inputs\":{\"video1_path\":[\"97\",0],\"video2_path\":[\"98\",0],\"device\":\"cpu\",\"resolution_reference\":\"video1\",\"output_path\":\"/home/ccran/ComfyUI/output\"},\"class_type\":\"MergingVideoByTwo\",\"_meta\":{\"title\":\"\\uD83D\\uDD25MergingVideoByTwo\"}},\"104\":{\"inputs\":{\"video_path\":[\"99\",0],\"audio_from\":\"audio_file\",\"file_path\":\"/home/ccran/ComfyUI/input/man_full_audio.wav\",\"delay_play\":0,\"output_path\":\"/home/ccran/ComfyUI/output\"},\"class_type\":\"AddAudio\",\"_meta\":{\"title\":\"\\uD83D\\uDD25AddAudio\"}},\"107\":{\"inputs\":{\"output\":\"\",\"source\":[\"99\",0]},\"class_type\":\"Display Any (rgthree)\",\"_meta\":{\"title\":\"Display Any (rgthree)\"}},\"108\":{\"inputs\":{\"output\":\"\",\"source\":[\"104\",0]},\"class_type\":\"Display Any (rgthree)\",\"_meta\":{\"title\":\"Display Any (rgthree)\"}},\"109\":{\"inputs\":{\"output\":\"\",\"source\":[\"98\",0]},\"class_type\":\"Display Any (rgthree)\",\"_meta\":{\"title\":\"Display Any (rgthree)\"}},\"110\":{\"inputs\":{\"output\":\"\",\"source\":[\"97\",0]},\"class_type\":\"Display Any (rgthree)\",\"_meta\":{\"title\":\"Display Any (rgthree)\"}},\"111\":{\"inputs\":{\"output\":\"\",\"source\":[\"96\",0]},\"class_type\":\"Display Any (rgthree)\",\"_meta\":{\"title\":\"Display Any (rgthree)\"}},\"112\":{\"inputs\":{\"index\":-1,\"filenames\":[\"14\",0]},\"class_type\":\"SELECT_VHS_FILENAME\",\"_meta\":{\"title\":\"SELECT_VHS_FILENAME\"}},\"113\":{\"inputs\":{\"index\":-1,\"filenames\":[\"54\",0]},\"class_type\":\"SELECT_VHS_FILENAME\",\"_meta\":{\"title\":\"SELECT_VHS_FILENAME\"}},\"114\":{\"inputs\":{\"index\":-1,\"filenames\":[\"57\",0]},\"class_type\":\"SELECT_VHS_FILENAME\",\"_meta\":{\"title\":\"SELECT_VHS_FILENAME\"}},\"115\":{\"inputs\":{\"index\":-1,\"filenames\":[\"61\",0]},\"class_type\":\"SELECT_VHS_FILENAME\",\"_meta\":{\"title\":\"SELECT_VHS_FILENAME\"}}},\"extra_data\":{\"extra_pnginfo\":{\"workflow\":{\"last_node_id\":120,\"last_link_id\":84,\"nodes\":[{\"id\":1,\"type\":\"ReActorFaceSwap\",\"pos\":[515,130],\"size\":{\"0\":315,\"1\":358},\"flags\":{},\"order\":6,\"mode\":0,\"inputs\":[{\"name\":\"input_image\",\"type\":\"IMAGE\",\"link\":13,\"label\":\"input_image\"},{\"name\":\"source_image\",\"type\":\"IMAGE\",\"link\":14,\"label\":\"source_image\"},{\"name\":\"face_model\",\"type\":\"FACE_MODEL\",\"link\":null,\"label\":\"face_model\"},{\"name\":\"face_boost\",\"type\":\"FACE_BOOST\",\"link\":null,\"label\":\"face_boost\"}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[15],\"shape\":3,\"label\":\"IMAGE\"},{\"name\":\"FACE_MODEL\",\"type\":\"FACE_MODEL\",\"links\":null,\"shape\":3,\"label\":\"FACE_MODEL\"}],\"title\":\"ReActor换脸\",\"properties\":{\"Node name for S&R\":\"ReActorFaceSwap\"},\"widgets_values\":[true,\"inswapper_128.onnx\",\"retinaface_resnet50\",\"GFPGANv1.4.pth\",1,0.5,\"no\",\"no\",\"0\",\"0\",1]},{\"id\":53,\"type\":\"ReActorFaceSwap\",\"pos\":[515,618],\"size\":{\"0\":315,\"1\":358},\"flags\":{},\"order\":5,\"mode\":0,\"inputs\":[{\"name\":\"input_image\",\"type\":\"IMAGE\",\"link\":16,\"label\":\"input_image\"},{\"name\":\"source_image\",\"type\":\"IMAGE\",\"link\":17,\"label\":\"source_image\"},{\"name\":\"face_model\",\"type\":\"FACE_MODEL\",\"link\":null,\"label\":\"face_model\"},{\"name\":\"face_boost\",\"type\":\"FACE_BOOST\",\"link\":null,\"label\":\"face_boost\"}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[18],\"shape\":3,\"label\":\"IMAGE\"},{\"name\":\"FACE_MODEL\",\"type\":\"FACE_MODEL\",\"links\":null,\"shape\":3,\"label\":\"FACE_MODEL\"}],\"title\":\"ReActor换脸\",\"properties\":{\"Node name for S&R\":\"ReActorFaceSwap\"},\"widgets_values\":[true,\"inswapper_128.onnx\",\"retinaface_resnet50\",\"GFPGANv1.4.pth\",1,0.5,\"no\",\"no\",\"0\",\"0\",1]},{\"id\":56,\"type\":\"ReActorFaceSwap\",\"pos\":[515,1106],\"size\":{\"0\":315,\"1\":358},\"flags\":{},\"order\":7,\"mode\":0,\"inputs\":[{\"name\":\"input_image\",\"type\":\"IMAGE\",\"link\":19,\"label\":\"input_image\"},{\"name\":\"source_image\",\"type\":\"IMAGE\",\"link\":20,\"label\":\"source_image\"},{\"name\":\"face_model\",\"type\":\"FACE_MODEL\",\"link\":null,\"label\":\"face_model\"},{\"name\":\"face_boost\",\"type\":\"FACE_BOOST\",\"link\":null,\"label\":\"face_boost\"}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[21],\"shape\":3,\"label\":\"IMAGE\"},{\"name\":\"FACE_MODEL\",\"type\":\"FACE_MODEL\",\"links\":null,\"shape\":3,\"label\":\"FACE_MODEL\"}],\"title\":\"ReActor换脸\",\"properties\":{\"Node name for S&R\":\"ReActorFaceSwap\"},\"widgets_values\":[true,\"inswapper_128.onnx\",\"retinaface_resnet50\",\"GFPGANv1.4.pth\",1,0.5,\"no\",\"no\",\"0\",\"0\",1]},{\"id\":60,\"type\":\"ReActorFaceSwap\",\"pos\":[515,1594],\"size\":{\"0\":315,\"1\":358},\"flags\":{},\"order\":8,\"mode\":0,\"inputs\":[{\"name\":\"input_image\",\"type\":\"IMAGE\",\"link\":22,\"label\":\"input_image\"},{\"name\":\"source_image\",\"type\":\"IMAGE\",\"link\":23,\"label\":\"source_image\"},{\"name\":\"face_model\",\"type\":\"FACE_MODEL\",\"link\":null,\"label\":\"face_model\"},{\"name\":\"face_boost\",\"type\":\"FACE_BOOST\",\"link\":null,\"label\":\"face_boost\"}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[24],\"shape\":3,\"label\":\"IMAGE\"},{\"name\":\"FACE_MODEL\",\"type\":\"FACE_MODEL\",\"links\":null,\"shape\":3,\"label\":\"FACE_MODEL\"}],\"title\":\"ReActor换脸\",\"properties\":{\"Node name for S&R\":\"ReActorFaceSwap\"},\"widgets_values\":[true,\"inswapper_128.onnx\",\"retinaface_resnet50\",\"GFPGANv1.4.pth\",1,0.5,\"no\",\"no\",\"0\",\"0\",1]},{\"id\":70,\"type\":\"Display Any (rgthree)\",\"pos\":[1266,-19],\"size\":{\"0\":210,\"1\":76.00000762939453},\"flags\":{},\"order\":19,\"mode\":0,\"inputs\":[{\"name\":\"source\",\"type\":\"*\",\"link\":74,\"dir\":3,\"label\":\"source\"}],\"properties\":{\"Node name for S&R\":\"Display Any (rgthree)\"},\"widgets_values\":[\"\"]},{\"id\":83,\"type\":\"Display Any (rgthree)\",\"pos\":[1609,-16],\"size\":{\"0\":210,\"1\":76.0000228881836},\"flags\":{},\"order\":26,\"mode\":0,\"inputs\":[{\"name\":\"source\",\"type\":\"*\",\"link\":39,\"dir\":3,\"label\":\"source\"}],\"properties\":{\"Node name for S&R\":\"Display Any (rgthree)\"},\"widgets_values\":[\"\"]},{\"id\":85,\"type\":\"Display Any (rgthree)\",\"pos\":[1280,480],\"size\":{\"0\":210,\"1\":76.00000762939453},\"flags\":{},\"order\":18,\"mode\":0,\"inputs\":[{\"name\":\"source\",\"type\":\"*\",\"link\":78,\"dir\":3,\"label\":\"source\"}],\"properties\":{\"Node name for S&R\":\"Display Any (rgthree)\"},\"widgets_values\":[\"\"]},{\"id\":87,\"type\":\"Display Any (rgthree)\",\"pos\":[1620,480],\"size\":{\"0\":210,\"1\":76.0000228881836},\"flags\":{},\"order\":25,\"mode\":0,\"inputs\":[{\"name\":\"source\",\"type\":\"*\",\"link\":43,\"dir\":3,\"label\":\"source\"}],\"properties\":{\"Node name for S&R\":\"Display Any (rgthree)\"},\"widgets_values\":[\"\"]},{\"id\":89,\"type\":\"Display Any (rgthree)\",\"pos\":[1270,970],\"size\":{\"0\":210,\"1\":76.00005340576172},\"flags\":{},\"order\":22,\"mode\":0,\"inputs\":[{\"name\":\"source\",\"type\":\"*\",\"link\":81,\"dir\":3,\"label\":\"source\"}],\"properties\":{\"Node name for S&R\":\"Display Any (rgthree)\"},\"widgets_values\":[\"\"]},{\"id\":57,\"type\":\"VHS_VideoCombine\",\"pos\":[920,1113],\"size\":[210,430],\"flags\":{},\"order\":11,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":21,\"label\":\"images\"},{\"name\":\"audio\",\"type\":\"AUDIO\",\"link\":null,\"label\":\"audio\"},{\"name\":\"meta_batch\",\"type\":\"VHS_BatchManager\",\"link\":null,\"label\":\"meta_batch\"},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":null,\"label\":\"vae\"}],\"outputs\":[{\"name\":\"Filenames\",\"type\":\"VHS_FILENAMES\",\"links\":[80],\"slot_index\":0,\"shape\":3,\"label\":\"Filenames\"}],\"title\":\"合并为视频\",\"properties\":{\"Node name for S&R\":\"VHS_VideoCombine\"},\"widgets_values\":{\"frame_rate\":30,\"loop_count\":0,\"filename_prefix\":\"Faceswap_3\",\"format\":\"video/h264-mp4\",\"pix_fmt\":\"yuv420p\",\"crf\":2,\"save_metadata\":true,\"pingpong\":false,\"save_output\":true,\"videopreview\":{\"hidden\":false,\"paused\":false,\"params\":{\"filename\":\"Faceswap_3_00017.mp4\",\"subfolder\":\"\",\"type\":\"output\",\"format\":\"video/h264-mp4\",\"frame_rate\":30},\"muted\":false}}},{\"id\":93,\"type\":\"Display Any (rgthree)\",\"pos\":[1250,1430],\"size\":{\"0\":210,\"1\":76.00005340576172},\"flags\":{},\"order\":24,\"mode\":0,\"inputs\":[{\"name\":\"source\",\"type\":\"*\",\"link\":84,\"dir\":3,\"label\":\"source\"}],\"properties\":{\"Node name for S&R\":\"Display Any (rgthree)\"},\"widgets_values\":[\"\"]},{\"id\":95,\"type\":\"Display Any (rgthree)\",\"pos\":[1590,1430],\"size\":{\"0\":210,\"1\":76.00005340576172},\"flags\":{},\"order\":29,\"mode\":0,\"inputs\":[{\"name\":\"source\",\"type\":\"*\",\"link\":51,\"dir\":3,\"label\":\"source\"}],\"properties\":{\"Node name for S&R\":\"Display Any (rgthree)\"},\"widgets_values\":[\"\"]},{\"id\":61,\"type\":\"VHS_VideoCombine\",\"pos\":[913,1580],\"size\":[210,430],\"flags\":{},\"order\":12,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":24,\"label\":\"images\"},{\"name\":\"audio\",\"type\":\"AUDIO\",\"link\":null,\"label\":\"audio\"},{\"name\":\"meta_batch\",\"type\":\"VHS_BatchManager\",\"link\":null,\"label\":\"meta_batch\"},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":null,\"label\":\"vae\"}],\"outputs\":[{\"name\":\"Filenames\",\"type\":\"VHS_FILENAMES\",\"links\":[83],\"slot_index\":0,\"shape\":3,\"label\":\"Filenames\"}],\"title\":\"合并为视频\",\"properties\":{\"Node name for S&R\":\"VHS_VideoCombine\"},\"widgets_values\":{\"frame_rate\":30,\"loop_count\":0,\"filename_prefix\":\"Faceswap_4\",\"format\":\"video/h264-mp4\",\"pix_fmt\":\"yuv420p\",\"crf\":2,\"save_metadata\":true,\"pingpong\":false,\"save_output\":true,\"videopreview\":{\"hidden\":false,\"paused\":false,\"params\":{\"filename\":\"Faceswap_4_00016.mp4\",\"subfolder\":\"\",\"type\":\"output\",\"format\":\"video/h264-mp4\",\"frame_rate\":30},\"muted\":false}}},{\"id\":91,\"type\":\"Display Any (rgthree)\",\"pos\":[1610,970],\"size\":{\"0\":210,\"1\":76.00005340576172},\"flags\":{},\"order\":28,\"mode\":0,\"inputs\":[{\"name\":\"source\",\"type\":\"*\",\"link\":47,\"dir\":3,\"label\":\"source\"}],\"properties\":{\"Node name for S&R\":\"Display Any (rgthree)\"},\"widgets_values\":[\"\"]},{\"id\":107,\"type\":\"Display Any (rgthree)\",\"pos\":[2410,470],\"size\":{\"0\":210,\"1\":76.00000762939453},\"flags\":{},\"order\":37,\"mode\":0,\"inputs\":[{\"name\":\"source\",\"type\":\"*\",\"link\":68,\"dir\":3,\"label\":\"source\"}],\"properties\":{\"Node name for S&R\":\"Display Any (rgthree)\"},\"widgets_values\":[\"\"]},{\"id\":108,\"type\":\"Display Any (rgthree)\",\"pos\":[2870,480],\"size\":{\"0\":210,\"1\":76.00000762939453},\"flags\":{},\"order\":38,\"mode\":0,\"inputs\":[{\"name\":\"source\",\"type\":\"*\",\"link\":69,\"dir\":3,\"label\":\"source\"}],\"properties\":{\"Node name for S&R\":\"Display Any (rgthree)\"},\"widgets_values\":[\"\"]},{\"id\":109,\"type\":\"Display Any (rgthree)\",\"pos\":[2000,990],\"size\":{\"0\":210,\"1\":76.00000762939453},\"flags\":{},\"order\":35,\"mode\":0,\"inputs\":[{\"name\":\"source\",\"type\":\"*\",\"link\":70,\"dir\":3,\"label\":\"source\"}],\"properties\":{\"Node name for S&R\":\"Display Any (rgthree)\"},\"widgets_values\":[\"\"]},{\"id\":110,\"type\":\"Display Any (rgthree)\",\"pos\":[2000,-20],\"size\":{\"0\":210,\"1\":76.00000762939453},\"flags\":{},\"order\":31,\"mode\":0,\"inputs\":[{\"name\":\"source\",\"type\":\"*\",\"link\":71,\"dir\":3,\"label\":\"source\"}],\"properties\":{\"Node name for S&R\":\"Display Any (rgthree)\"},\"widgets_values\":[\"\"]},{\"id\":111,\"type\":\"Display Any (rgthree)\",\"pos\":[2047,1448],\"size\":{\"0\":210,\"1\":76.00000762939453},\"flags\":{},\"order\":33,\"mode\":0,\"inputs\":[{\"name\":\"source\",\"type\":\"*\",\"link\":72,\"dir\":3,\"label\":\"source\"}],\"properties\":{\"Node name for S&R\":\"Display Any (rgthree)\"},\"widgets_values\":[\"\"]},{\"id\":112,\"type\":\"SELECT_VHS_FILENAME\",\"pos\":[1180,130],\"size\":{\"0\":315,\"1\":58},\"flags\":{},\"order\":14,\"mode\":0,\"inputs\":[{\"name\":\"filenames\",\"type\":\"VHS_FILENAMES\",\"link\":73,\"label\":\"filenames\"}],\"outputs\":[{\"name\":\"Filename\",\"type\":\"STRING\",\"links\":[74,75],\"shape\":3,\"label\":\"Filename\",\"slot_index\":0}],\"properties\":{\"Node name for S&R\":\"SELECT_VHS_FILENAME\"},\"widgets_values\":[-1]},{\"id\":54,\"type\":\"VHS_VideoCombine\",\"pos\":[926,626],\"size\":[210,430],\"flags\":{},\"order\":9,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":18,\"label\":\"images\"},{\"name\":\"audio\",\"type\":\"AUDIO\",\"link\":null,\"label\":\"audio\"},{\"name\":\"meta_batch\",\"type\":\"VHS_BatchManager\",\"link\":null,\"label\":\"meta_batch\"},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":null,\"label\":\"vae\"}],\"outputs\":[{\"name\":\"Filenames\",\"type\":\"VHS_FILENAMES\",\"links\":[76],\"slot_index\":0,\"shape\":3,\"label\":\"Filenames\"}],\"title\":\"合并为视频\",\"properties\":{\"Node name for S&R\":\"VHS_VideoCombine\"},\"widgets_values\":{\"frame_rate\":30,\"loop_count\":0,\"filename_prefix\":\"Faceswap_2\",\"format\":\"video/h264-mp4\",\"pix_fmt\":\"yuv420p\",\"crf\":2,\"save_metadata\":true,\"pingpong\":false,\"save_output\":true,\"videopreview\":{\"hidden\":false,\"paused\":false,\"params\":{\"filename\":\"Faceswap_2_00020.mp4\",\"subfolder\":\"\",\"type\":\"output\",\"format\":\"video/h264-mp4\",\"frame_rate\":30},\"muted\":false}}},{\"id\":113,\"type\":\"SELECT_VHS_FILENAME\",\"pos\":[1180,630],\"size\":{\"0\":315,\"1\":58},\"flags\":{},\"order\":13,\"mode\":0,\"inputs\":[{\"name\":\"filenames\",\"type\":\"VHS_FILENAMES\",\"link\":76,\"label\":\"filenames\"}],\"outputs\":[{\"name\":\"Filename\",\"type\":\"STRING\",\"links\":[77,78],\"shape\":3,\"label\":\"Filename\",\"slot_index\":0}],\"properties\":{\"Node name for S&R\":\"SELECT_VHS_FILENAME\"},\"widgets_values\":[-1]},{\"id\":114,\"type\":\"SELECT_VHS_FILENAME\",\"pos\":[1170,1120],\"size\":{\"0\":315,\"1\":58},\"flags\":{},\"order\":15,\"mode\":0,\"inputs\":[{\"name\":\"filenames\",\"type\":\"VHS_FILENAMES\",\"link\":80,\"label\":\"filenames\",\"slot_index\":0}],\"outputs\":[{\"name\":\"Filename\",\"type\":\"STRING\",\"links\":[79,81],\"shape\":3,\"label\":\"Filename\",\"slot_index\":0}],\"properties\":{\"Node name for S&R\":\"SELECT_VHS_FILENAME\"},\"widgets_values\":[-1]},{\"id\":115,\"type\":\"SELECT_VHS_FILENAME\",\"pos\":[1150,1580],\"size\":{\"0\":315,\"1\":58},\"flags\":{},\"order\":16,\"mode\":0,\"inputs\":[{\"name\":\"filenames\",\"type\":\"VHS_FILENAMES\",\"link\":83,\"label\":\"filenames\",\"slot_index\":0}],\"outputs\":[{\"name\":\"Filename\",\"type\":\"STRING\",\"links\":[82,84],\"shape\":3,\"label\":\"Filename\",\"slot_index\":0}],\"properties\":{\"Node name for S&R\":\"SELECT_VHS_FILENAME\"},\"widgets_values\":[-1]},{\"id\":52,\"type\":\"VHS_LoadVideo\",\"pos\":[100,610],\"size\":[250,410],\"flags\":{},\"order\":0,\"mode\":0,\"inputs\":[{\"name\":\"meta_batch\",\"type\":\"VHS_BatchManager\",\"link\":null,\"label\":\"meta_batch\"},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":null,\"label\":\"vae\"}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[16],\"shape\":3,\"label\":\"IMAGE\"},{\"name\":\"frame_count\",\"type\":\"INT\",\"links\":null,\"shape\":3,\"label\":\"frame_count\"},{\"name\":\"audio\",\"type\":\"AUDIO\",\"links\":null,\"shape\":3,\"label\":\"audio\"},{\"name\":\"video_info\",\"type\":\"VHS_VIDEOINFO\",\"links\":null,\"shape\":3,\"label\":\"video_info\"}],\"title\":\"加载视频\",\"properties\":{\"Node name for S&R\":\"VHS_LoadVideo\"},\"widgets_values\":{\"video\":\"man_faceswap_clip_2.mp4\",\"force_rate\":0,\"force_size\":\"Disabled\",\"custom_width\":512,\"custom_height\":512,\"frame_load_cap\":0,\"skip_first_frames\":0,\"select_every_nth\":1,\"choose video to upload\":\"image\",\"videopreview\":{\"hidden\":false,\"paused\":false,\"params\":{\"filename\":\"man_faceswap_clip_2.mp4\",\"type\":\"input\",\"format\":\"video/mp4\",\"frame_load_cap\":0,\"skip_first_frames\":0,\"force_rate\":0,\"select_every_nth\":1},\"muted\":false}}},{\"id\":2,\"type\":\"LoadImage\",\"pos\":[-418,141],\"size\":{\"0\":315,\"1\":314},\"flags\":{},\"order\":1,\"mode\":0,\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[14,17,20,23],\"shape\":3,\"label\":\"IMAGE\"},{\"name\":\"MASK\",\"type\":\"MASK\",\"links\":null,\"shape\":3,\"label\":\"MASK\"}],\"title\":\"加载图像\",\"properties\":{\"Node name for S&R\":\"LoadImage\"},\"widgets_values\":[\"man_Example_faceswap_pictures.jpg\",\"image\"]},{\"id\":9,\"type\":\"VHS_LoadVideo\",\"pos\":[106,129],\"size\":[250,410],\"flags\":{},\"order\":2,\"mode\":0,\"inputs\":[{\"name\":\"meta_batch\",\"type\":\"VHS_BatchManager\",\"link\":null,\"label\":\"meta_batch\"},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":null,\"label\":\"vae\"}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[13],\"shape\":3,\"label\":\"IMAGE\"},{\"name\":\"frame_count\",\"type\":\"INT\",\"links\":null,\"shape\":3,\"label\":\"frame_count\"},{\"name\":\"audio\",\"type\":\"AUDIO\",\"links\":null,\"shape\":3,\"label\":\"audio\"},{\"name\":\"video_info\",\"type\":\"VHS_VIDEOINFO\",\"links\":null,\"shape\":3,\"label\":\"video_info\"}],\"title\":\"加载视频\",\"properties\":{\"Node name for S&R\":\"VHS_LoadVideo\"},\"widgets_values\":{\"video\":\"man_faceswap_clip_1.mp4\",\"force_rate\":0,\"force_size\":\"Disabled\",\"custom_width\":512,\"custom_height\":512,\"frame_load_cap\":0,\"skip_first_frames\":0,\"select_every_nth\":1,\"choose video to upload\":\"image\",\"videopreview\":{\"hidden\":false,\"paused\":false,\"params\":{\"filename\":\"man_faceswap_clip_1.mp4\",\"type\":\"input\",\"format\":\"video/mp4\",\"frame_load_cap\":0,\"skip_first_frames\":0,\"force_rate\":0,\"select_every_nth\":1},\"muted\":false}}},{\"id\":14,\"type\":\"VHS_VideoCombine\",\"pos\":[930,130],\"size\":[210,430],\"flags\":{},\"order\":10,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":15,\"label\":\"images\"},{\"name\":\"audio\",\"type\":\"AUDIO\",\"link\":null,\"label\":\"audio\"},{\"name\":\"meta_batch\",\"type\":\"VHS_BatchManager\",\"link\":null,\"label\":\"meta_batch\"},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":null,\"label\":\"vae\"}],\"outputs\":[{\"name\":\"Filenames\",\"type\":\"VHS_FILENAMES\",\"links\":[73],\"slot_index\":0,\"shape\":3,\"label\":\"Filenames\"}],\"title\":\"合并为视频\",\"properties\":{\"Node name for S&R\":\"VHS_VideoCombine\"},\"widgets_values\":{\"frame_rate\":30,\"loop_count\":0,\"filename_prefix\":\"Faceswap_1\",\"format\":\"video/h264-mp4\",\"pix_fmt\":\"yuv420p\",\"crf\":2,\"save_metadata\":true,\"pingpong\":false,\"save_output\":true,\"videopreview\":{\"hidden\":false,\"paused\":false,\"params\":{\"filename\":\"Faceswap_1_00024.mp4\",\"subfolder\":\"\",\"type\":\"output\",\"format\":\"video/h264-mp4\",\"frame_rate\":30},\"muted\":false}}},{\"id\":55,\"type\":\"VHS_LoadVideo\",\"pos\":[104,1098],\"size\":[250,410],\"flags\":{},\"order\":3,\"mode\":0,\"inputs\":[{\"name\":\"meta_batch\",\"type\":\"VHS_BatchManager\",\"link\":null,\"label\":\"meta_batch\"},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":null,\"label\":\"vae\"}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[19],\"shape\":3,\"label\":\"IMAGE\"},{\"name\":\"frame_count\",\"type\":\"INT\",\"links\":null,\"shape\":3,\"label\":\"frame_count\"},{\"name\":\"audio\",\"type\":\"AUDIO\",\"links\":null,\"shape\":3,\"label\":\"audio\"},{\"name\":\"video_info\",\"type\":\"VHS_VIDEOINFO\",\"links\":null,\"shape\":3,\"label\":\"video_info\"}],\"title\":\"加载视频\",\"properties\":{\"Node name for S&R\":\"VHS_LoadVideo\"},\"widgets_values\":{\"video\":\"man_faceswap_clip_3.mp4\",\"force_rate\":0,\"force_size\":\"Disabled\",\"custom_width\":512,\"custom_height\":512,\"frame_load_cap\":0,\"skip_first_frames\":0,\"select_every_nth\":1,\"choose video to upload\":\"image\",\"videopreview\":{\"hidden\":false,\"paused\":false,\"params\":{\"filename\":\"man_faceswap_clip_3.mp4\",\"type\":\"input\",\"format\":\"video/mp4\",\"frame_load_cap\":0,\"skip_first_frames\":0,\"force_rate\":0,\"select_every_nth\":1},\"muted\":false}}},{\"id\":59,\"type\":\"VHS_LoadVideo\",\"pos\":[107,1591],\"size\":[250,410],\"flags\":{},\"order\":4,\"mode\":0,\"inputs\":[{\"name\":\"meta_batch\",\"type\":\"VHS_BatchManager\",\"link\":null,\"label\":\"meta_batch\"},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":null,\"label\":\"vae\"}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[22],\"shape\":3,\"label\":\"IMAGE\"},{\"name\":\"frame_count\",\"type\":\"INT\",\"links\":null,\"shape\":3,\"label\":\"frame_count\"},{\"name\":\"audio\",\"type\":\"AUDIO\",\"links\":null,\"shape\":3,\"label\":\"audio\"},{\"name\":\"video_info\",\"type\":\"VHS_VIDEOINFO\",\"links\":null,\"shape\":3,\"label\":\"video_info\"}],\"title\":\"加载视频\",\"properties\":{\"Node name for S&R\":\"VHS_LoadVideo\"},\"widgets_values\":{\"video\":\"man_faceswap_clip_4.mp4\",\"force_rate\":0,\"force_size\":\"Disabled\",\"custom_width\":512,\"custom_height\":512,\"frame_load_cap\":0,\"skip_first_frames\":0,\"select_every_nth\":1,\"choose video to upload\":\"image\",\"videopreview\":{\"hidden\":false,\"paused\":false,\"params\":{\"filename\":\"man_faceswap_clip_4.mp4\",\"type\":\"input\",\"format\":\"video/mp4\",\"frame_load_cap\":0,\"skip_first_frames\":0,\"force_rate\":0,\"select_every_nth\":1},\"muted\":false}}},{\"id\":104,\"type\":\"AddAudio\",\"pos\":[2770,610],\"size\":{\"0\":315,\"1\":154},\"flags\":{},\"order\":36,\"mode\":0,\"inputs\":[{\"name\":\"video_path\",\"type\":\"STRING\",\"link\":65,\"widget\":{\"name\":\"video_path\"},\"label\":\"video_path\"}],\"outputs\":[{\"name\":\"video_complete_path\",\"type\":\"STRING\",\"links\":[69],\"slot_index\":0,\"shape\":3,\"label\":\"video_complete_path\"}],\"properties\":{\"Node name for S&R\":\"AddAudio\"},\"widgets_values\":[\"C:/Users/Desktop/video.mp4\",\"audio_file\",\"/home/ccran/ComfyUI/input/man_full_audio.wav\",0,\"/home/ccran/ComfyUI/output\"]},{\"id\":82,\"type\":\"MergingVideoByTwo\",\"pos\":[1510,130],\"size\":{\"0\":315,\"1\":154},\"flags\":{},\"order\":20,\"mode\":0,\"inputs\":[{\"name\":\"video2_path\",\"type\":\"STRING\",\"link\":75,\"widget\":{\"name\":\"video2_path\"},\"label\":\"video2_path\"}],\"outputs\":[{\"name\":\"video_complete_path\",\"type\":\"STRING\",\"links\":[39,56],\"slot_index\":0,\"shape\":3,\"label\":\"video_complete_path\"}],\"properties\":{\"Node name for S&R\":\"MergingVideoByTwo\"},\"widgets_values\":[\"/home/ccran/ComfyUI/input/Fixed_1.mp4\",\"C:/Users/Desktop/video2.mp4\",\"cpu\",\"video1\",\"/home/ccran/ComfyUI/output\"]},{\"id\":86,\"type\":\"MergingVideoByTwo\",\"pos\":[1530,630],\"size\":{\"0\":315,\"1\":154},\"flags\":{},\"order\":17,\"mode\":0,\"inputs\":[{\"name\":\"video2_path\",\"type\":\"STRING\",\"link\":77,\"widget\":{\"name\":\"video2_path\"},\"label\":\"video2_path\"}],\"outputs\":[{\"name\":\"video_complete_path\",\"type\":\"STRING\",\"links\":[43,57],\"slot_index\":0,\"shape\":3,\"label\":\"video_complete_path\"}],\"properties\":{\"Node name for S&R\":\"MergingVideoByTwo\"},\"widgets_values\":[\"/home/ccran/ComfyUI/input/Fixed_2.mp4\",\"C:/Users/Desktop/video2.mp4\",\"cpu\",\"video1\",\"/home/ccran/ComfyUI/output\"]},{\"id\":97,\"type\":\"MergingVideoByTwo\",\"pos\":[1900,130],\"size\":{\"0\":315,\"1\":154},\"flags\":{},\"order\":27,\"mode\":0,\"inputs\":[{\"name\":\"video1_path\",\"type\":\"STRING\",\"link\":56,\"widget\":{\"name\":\"video1_path\"},\"label\":\"video1_path\"},{\"name\":\"video2_path\",\"type\":\"STRING\",\"link\":57,\"widget\":{\"name\":\"video2_path\"},\"label\":\"video2_path\"}],\"outputs\":[{\"name\":\"video_complete_path\",\"type\":\"STRING\",\"links\":[60,71],\"slot_index\":0,\"shape\":3,\"label\":\"video_complete_path\"}],\"properties\":{\"Node name for S&R\":\"MergingVideoByTwo\"},\"widgets_values\":[\"C:\\\\zhu\\\\fixed\\\\Fixed_1.mp4\",\"C:/Users/Desktop/video2.mp4\",\"cpu\",\"video1\",\"/home/ccran/ComfyUI/output\"]},{\"id\":90,\"type\":\"MergingVideoByTwo\",\"pos\":[1510,1120],\"size\":{\"0\":315,\"1\":154},\"flags\":{},\"order\":21,\"mode\":0,\"inputs\":[{\"name\":\"video2_path\",\"type\":\"STRING\",\"link\":79,\"widget\":{\"name\":\"video2_path\"},\"label\":\"video2_path\"}],\"outputs\":[{\"name\":\"video_complete_path\",\"type\":\"STRING\",\"links\":[47,58],\"slot_index\":0,\"shape\":3,\"label\":\"video_complete_path\"}],\"properties\":{\"Node name for S&R\":\"MergingVideoByTwo\"},\"widgets_values\":[\"/home/ccran/ComfyUI/input/Fixed_3.mp4\",\"C:/Users/Desktop/video2.mp4\",\"cpu\",\"video1\",\"/home/ccran/ComfyUI/output\"]},{\"id\":94,\"type\":\"MergingVideoByTwo\",\"pos\":[1490,1580],\"size\":{\"0\":315,\"1\":154},\"flags\":{},\"order\":23,\"mode\":0,\"inputs\":[{\"name\":\"video2_path\",\"type\":\"STRING\",\"link\":82,\"widget\":{\"name\":\"video2_path\"},\"label\":\"video2_path\"}],\"outputs\":[{\"name\":\"video_complete_path\",\"type\":\"STRING\",\"links\":[51,53],\"slot_index\":0,\"shape\":3,\"label\":\"video_complete_path\"}],\"properties\":{\"Node name for S&R\":\"MergingVideoByTwo\"},\"widgets_values\":[\"/home/ccran/ComfyUI/input/Fixed_4.mp4\",\"C:/Users/Desktop/video2.mp4\",\"cpu\",\"video1\",\"/home/ccran/ComfyUI/output\"]},{\"id\":96,\"type\":\"MergingVideoByTwo\",\"pos\":[1910,1590],\"size\":{\"0\":315,\"1\":154},\"flags\":{},\"order\":30,\"mode\":0,\"inputs\":[{\"name\":\"video1_path\",\"type\":\"STRING\",\"link\":53,\"widget\":{\"name\":\"video1_path\"},\"label\":\"video1_path\"}],\"outputs\":[{\"name\":\"video_complete_path\",\"type\":\"STRING\",\"links\":[59,72],\"slot_index\":0,\"shape\":3,\"label\":\"video_complete_path\"}],\"properties\":{\"Node name for S&R\":\"MergingVideoByTwo\"},\"widgets_values\":[\"C:\\\\zhu\\\\fixed\\\\Fixed_1.mp4\",\"/home/ccran/ComfyUI/input/Fixed_5.mp4\",\"cpu\",\"video1\",\"/home/ccran/ComfyUI/output\"]},{\"id\":98,\"type\":\"MergingVideoByTwo\",\"pos\":[1900,1120],\"size\":{\"0\":315,\"1\":154},\"flags\":{},\"order\":32,\"mode\":0,\"inputs\":[{\"name\":\"video1_path\",\"type\":\"STRING\",\"link\":58,\"widget\":{\"name\":\"video1_path\"},\"label\":\"video1_path\"},{\"name\":\"video2_path\",\"type\":\"STRING\",\"link\":59,\"widget\":{\"name\":\"video2_path\"},\"label\":\"video2_path\"}],\"outputs\":[{\"name\":\"video_complete_path\",\"type\":\"STRING\",\"links\":[61,70],\"slot_index\":0,\"shape\":3,\"label\":\"video_complete_path\"}],\"properties\":{\"Node name for S&R\":\"MergingVideoByTwo\"},\"widgets_values\":[\"C:\\\\zhu\\\\fixed\\\\Fixed_1.mp4\",\"C:/Users/Desktop/video2.mp4\",\"cpu\",\"video1\",\"/home/ccran/ComfyUI/output\"]},{\"id\":99,\"type\":\"MergingVideoByTwo\",\"pos\":[2310,610],\"size\":{\"0\":315,\"1\":154},\"flags\":{},\"order\":34,\"mode\":0,\"inputs\":[{\"name\":\"video1_path\",\"type\":\"STRING\",\"link\":60,\"widget\":{\"name\":\"video1_path\"},\"label\":\"video1_path\"},{\"name\":\"video2_path\",\"type\":\"STRING\",\"link\":61,\"widget\":{\"name\":\"video2_path\"},\"label\":\"video2_path\"}],\"outputs\":[{\"name\":\"video_complete_path\",\"type\":\"STRING\",\"links\":[65,68],\"slot_index\":0,\"shape\":3,\"label\":\"video_complete_path\"}],\"properties\":{\"Node name for S&R\":\"MergingVideoByTwo\"},\"widgets_values\":[\"C:\\\\zhu\\\\fixed\\\\Fixed_1.mp4\",\"C:/Users/Desktop/video2.mp4\",\"cpu\",\"video1\",\"/home/ccran/ComfyUI/output\"]}],\"links\":[[13,9,0,1,0,\"IMAGE\"],[14,2,0,1,1,\"IMAGE\"],[15,1,0,14,0,\"IMAGE\"],[16,52,0,53,0,\"IMAGE\"],[17,2,0,53,1,\"IMAGE\"],[18,53,0,54,0,\"IMAGE\"],[19,55,0,56,0,\"IMAGE\"],[20,2,0,56,1,\"IMAGE\"],[21,56,0,57,0,\"IMAGE\"],[22,59,0,60,0,\"IMAGE\"],[23,2,0,60,1,\"IMAGE\"],[24,60,0,61,0,\"IMAGE\"],[39,82,0,83,0,\"*\"],[43,86,0,87,0,\"*\"],[47,90,0,91,0,\"*\"],[51,94,0,95,0,\"*\"],[53,94,0,96,0,\"STRING\"],[56,82,0,97,0,\"STRING\"],[57,86,0,97,1,\"STRING\"],[58,90,0,98,0,\"STRING\"],[59,96,0,98,1,\"STRING\"],[60,97,0,99,0,\"STRING\"],[61,98,0,99,1,\"STRING\"],[65,99,0,104,0,\"STRING\"],[68,99,0,107,0,\"*\"],[69,104,0,108,0,\"*\"],[70,98,0,109,0,\"*\"],[71,97,0,110,0,\"*\"],[72,96,0,111,0,\"*\"],[73,14,0,112,0,\"VHS_FILENAMES\"],[74,112,0,70,0,\"*\"],[75,112,0,82,0,\"STRING\"],[76,54,0,113,0,\"VHS_FILENAMES\"],[77,113,0,86,0,\"STRING\"],[78,113,0,85,0,\"*\"],[79,114,0,90,0,\"STRING\"],[80,57,0,114,0,\"VHS_FILENAMES\"],[81,114,0,89,0,\"*\"],[82,115,0,94,0,\"STRING\"],[83,61,0,115,0,\"VHS_FILENAMES\"],[84,115,0,93,0,\"*\"]],\"groups\":[],\"config\":{},\"extra\":{\"ds\":{\"scale\":0.6727499949325616,\"offset\":[116.0980402879424,159.022020804935]}},\"version\":0.4}}}}";
    //图片换脸工作流json
//    public static final String IMAGE_FACESWAP_DATA="{\"1\":{\"inputs\":{\"enabled\":true,\"swap_model\":\"inswapper_128.onnx\",\"facedetection\":\"retinaface_resnet50\",\"face_restore_model\":\"GFPGANv1.4.pth\",\"face_restore_visibility\":1,\"codeformer_weight\":0.5000000000000001,\"detect_gender_input\":\"no\",\"detect_gender_source\":\"no\",\"input_faces_index\":\"0\",\"source_faces_index\":\"0\",\"console_log_level\":1,\"input_image\":[\"2\",0],\"source_image\":[\"124\",0],\"face_boost\":[\"126\",0]},\"class_type\":\"ReActorFaceSwap\",\"_meta\":{\"title\":\"ReActor换脸\"}},\"2\":{\"inputs\":{\"image\":\"hg.png\",\"upload\":\"image\"},\"class_type\":\"LoadImage\",\"_meta\":{\"title\":\"加载图像\"}},\"124\":{\"inputs\":{\"image\":\"zbs.jpg\",\"upload\":\"image\"},\"class_type\":\"LoadImage\",\"_meta\":{\"title\":\"加载图像\"}},\"125\":{\"inputs\":{\"images\":[\"1\",0]},\"class_type\":\"PreviewImage\",\"_meta\":{\"title\":\"预览图像\"}},\"126\":{\"inputs\":{\"enabled\":true,\"boost_model\":\"GFPGANv1.4.pth\",\"interpolation\":\"Lanczos\",\"visibility\":1,\"codeformer_weight\":0.5,\"restore_with_main_after\":false},\"class_type\":\"ReActorFaceBoost\",\"_meta\":{\"title\":\"ReActor \uD83C\uDF0C Face Booster\"}}}";
    public static final String IMAGE_FACESWAP_DATA="{\"clientId\":\"default\",\"prompt\":{\"1\":{\"inputs\":{\"enabled\":true,\"swap_model\":\"inswapper_128.onnx\",\"facedetection\":\"retinaface_resnet50\",\"face_restore_model\":\"GFPGANv1.4.pth\",\"face_restore_visibility\":1,\"codeformer_weight\":0.5000000000000001,\"detect_gender_input\":\"no\",\"detect_gender_source\":\"no\",\"input_faces_index\":\"0\",\"source_faces_index\":\"0\",\"console_log_level\":1,\"input_image\":[\"2\",0],\"source_image\":[\"124\",0],\"face_boost\":[\"126\",0]},\"class_type\":\"ReActorFaceSwap\",\"_meta\":{\"title\":\"ReActor换脸\"}},\"2\":{\"inputs\":{\"image\":\"hg.png\",\"upload\":\"image\"},\"class_type\":\"LoadImage\",\"_meta\":{\"title\":\"加载图像\"}},\"124\":{\"inputs\":{\"image\":\"zbs.jpg\",\"upload\":\"image\"},\"class_type\":\"LoadImage\",\"_meta\":{\"title\":\"加载图像\"}},\"125\":{\"inputs\":{\"images\":[\"1\",0]},\"class_type\":\"PreviewImage\",\"_meta\":{\"title\":\"预览图像\"}},\"126\":{\"inputs\":{\"enabled\":true,\"boost_model\":\"GFPGANv1.4.pth\",\"interpolation\":\"Lanczos\",\"visibility\":1,\"codeformer_weight\":0.5,\"restore_with_main_after\":false},\"class_type\":\"ReActorFaceBoost\",\"_meta\":{\"title\":\"ReActor \uD83C\uDF0C Face Booster\"}}}}";
    //测试用的工作流json，这个跑得快四五分钟就出来了，但是只有片段
    public static final String SIMPLE_FACESWAP_DATA = "{\"client_id\":\"default\",\"prompt\":{\"1\":{\"inputs\":{\"enabled\":true,\"swap_model\":\"inswapper_128.onnx\",\"facedetection\":\"retinaface_resnet50\",\"face_restore_model\":\"GFPGANv1.4.pth\",\"face_restore_visibility\":1,\"codeformer_weight\":0.5,\"detect_gender_input\":\"no\",\"detect_gender_source\":\"no\",\"input_faces_index\":\"0\",\"source_faces_index\":\"0\",\"console_log_level\":1,\"input_image\":[\"9\",0],\"source_image\":[\"2\",0]},\"class_type\":\"ReActorFaceSwap\",\"_meta\":{\"title\":\"ReActor换脸\"}},\"2\":{\"inputs\":{\"image\":\"default\",\"upload\":\"image\"},\"class_type\":\"LoadImage\",\"_meta\":{\"title\":\"加载图像\"}},\"9\":{\"inputs\":{\"video\":\"man_faceswap_clip_1.mp4\",\"force_rate\":0,\"force_size\":\"Disabled\",\"custom_width\":512,\"custom_height\":512,\"frame_load_cap\":0,\"skip_first_frames\":0,\"select_every_nth\":1},\"class_type\":\"VHS_LoadVideo\",\"_meta\":{\"title\":\"加载视频\"}},\"14\":{\"inputs\":{\"frame_rate\":30,\"loop_count\":0,\"filename_prefix\":\"Faceswap_1\",\"format\":\"video/h264-mp4\",\"pix_fmt\":\"yuv420p\",\"crf\":2,\"save_metadata\":true,\"pingpong\":false,\"save_output\":true,\"images\":[\"1\",0]},\"class_type\":\"VHS_VideoCombine\",\"_meta\":{\"title\":\"合并为视频\"}}},\"extra_data\":{\"extra_pnginfo\":{\"workflow\":{\"last_node_id\":61,\"last_link_id\":24,\"nodes\":[{\"id\":9,\"type\":\"VHS_LoadVideo\",\"pos\":[140,360],\"size\":[250,410],\"flags\":{},\"order\":0,\"mode\":0,\"inputs\":[{\"name\":\"meta_batch\",\"type\":\"VHS_BatchManager\",\"link\":null,\"label\":\"meta_batch\"},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":null,\"label\":\"vae\"}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[13],\"shape\":3,\"label\":\"IMAGE\"},{\"name\":\"frame_count\",\"type\":\"INT\",\"links\":null,\"shape\":3,\"label\":\"frame_count\"},{\"name\":\"audio\",\"type\":\"AUDIO\",\"links\":null,\"shape\":3,\"label\":\"audio\"},{\"name\":\"video_info\",\"type\":\"VHS_VIDEOINFO\",\"links\":null,\"shape\":3,\"label\":\"video_info\"}],\"title\":\"加载视频\",\"properties\":{\"Node name for S&R\":\"VHS_LoadVideo\"},\"widgets_values\":{\"video\":\"man_faceswap_clip_1.mp4\",\"force_rate\":0,\"force_size\":\"Disabled\",\"custom_width\":512,\"custom_height\":512,\"frame_load_cap\":0,\"skip_first_frames\":0,\"select_every_nth\":1,\"choose video to upload\":\"image\",\"videopreview\":{\"hidden\":false,\"paused\":false,\"params\":{\"filename\":\"man_faceswap_clip_1.mp4\",\"type\":\"input\",\"format\":\"video/mp4\",\"frame_load_cap\":0,\"skip_first_frames\":0,\"force_rate\":0,\"select_every_nth\":1},\"muted\":false}}},{\"id\":1,\"type\":\"ReActorFaceSwap\",\"pos\":[540,700],\"size\":{\"0\":315,\"1\":358},\"flags\":{},\"order\":2,\"mode\":0,\"inputs\":[{\"name\":\"input_image\",\"type\":\"IMAGE\",\"link\":13,\"label\":\"input_image\"},{\"name\":\"source_image\",\"type\":\"IMAGE\",\"link\":14,\"label\":\"source_image\"},{\"name\":\"face_model\",\"type\":\"FACE_MODEL\",\"link\":null,\"label\":\"face_model\"},{\"name\":\"face_boost\",\"type\":\"FACE_BOOST\",\"link\":null,\"label\":\"face_boost\"}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[15],\"shape\":3,\"label\":\"IMAGE\"},{\"name\":\"FACE_MODEL\",\"type\":\"FACE_MODEL\",\"links\":null,\"shape\":3,\"label\":\"FACE_MODEL\"}],\"title\":\"ReActor换脸\",\"properties\":{\"Node name for S&R\":\"ReActorFaceSwap\"},\"widgets_values\":[true,\"inswapper_128.onnx\",\"retinaface_resnet50\",\"GFPGANv1.4.pth\",1,0.5,\"no\",\"no\",\"0\",\"0\",1]},{\"id\":2,\"type\":\"LoadImage\",\"pos\":[-380,720],\"size\":{\"0\":315,\"1\":314},\"flags\":{},\"order\":1,\"mode\":0,\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[14],\"shape\":3,\"label\":\"IMAGE\"},{\"name\":\"MASK\",\"type\":\"MASK\",\"links\":null,\"shape\":3,\"label\":\"MASK\"}],\"title\":\"加载图像\",\"properties\":{\"Node name for S&R\":\"LoadImage\"},\"widgets_values\":[\"cgx.png\",\"image\"]},{\"id\":14,\"type\":\"VHS_VideoCombine\",\"pos\":[1180,470],\"size\":[210,430],\"flags\":{},\"order\":3,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":15,\"label\":\"images\"},{\"name\":\"audio\",\"type\":\"AUDIO\",\"link\":null,\"label\":\"audio\"},{\"name\":\"meta_batch\",\"type\":\"VHS_BatchManager\",\"link\":null,\"label\":\"meta_batch\"},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":null,\"label\":\"vae\"}],\"outputs\":[{\"name\":\"Filenames\",\"type\":\"VHS_FILENAMES\",\"links\":null,\"shape\":3,\"label\":\"Filenames\"}],\"title\":\"合并为视频\",\"properties\":{\"Node name for S&R\":\"VHS_VideoCombine\"},\"widgets_values\":{\"frame_rate\":30,\"loop_count\":0,\"filename_prefix\":\"Faceswap_1\",\"format\":\"video/h264-mp4\",\"pix_fmt\":\"yuv420p\",\"crf\":2,\"save_metadata\":true,\"pingpong\":false,\"save_output\":true,\"videopreview\":{\"hidden\":false,\"paused\":false,\"params\":{\"filename\":\"Faceswap_1_00005.mp4\",\"subfolder\":\"\",\"type\":\"output\",\"format\":\"video/h264-mp4\",\"frame_rate\":30},\"muted\":false}}}],\"links\":[[13,9,0,1,0,\"IMAGE\"],[14,2,0,1,1,\"IMAGE\"],[15,1,0,14,0,\"IMAGE\"]],\"groups\":[],\"config\":{},\"extra\":{\"ds\":{\"scale\":0.6588450000000005,\"offset\":[959.093385873602,245.78926013756208]}},\"version\":0.4}}}}";
    //文生图的工作流json，暂时用不上
    public static final String TEXT_DATA = "{\"3\":{\"inputs\":{\"seed\":310795883335207,\"steps\":4,\"cfg\":1,\"sampler_name\":\"euler\",\"scheduler\":\"sgm_uniform\",\"denoise\":1,\"model\":[\"4\",0],\"positive\":[\"6\",0],\"negative\":[\"7\",0],\"latent_image\":[\"5\",0]},\"class_type\":\"KSampler\",\"_meta\":{\"title\":\"K采样器\"}},\"4\":{\"inputs\":{\"ckpt_name\":\"sdxl_lightning_4step.safetensors\"},\"class_type\":\"CheckpointLoaderSimple\",\"_meta\":{\"title\":\"Checkpoint加载器(简易)\"}},\"5\":{\"inputs\":{\"width\":1024,\"height\":1024,\"batch_size\":1},\"class_type\":\"EmptyLatentImage\",\"_meta\":{\"title\":\"空Latent\"}},\"6\":{\"inputs\":{\"text\":\"one dog\",\"clip\":[\"4\",1]},\"class_type\":\"CLIPTextEncode\",\"_meta\":{\"title\":\"CLIP文本编码器\"}},\"7\":{\"inputs\":{\"text\":\"text, watermark\",\"clip\":[\"4\",1]},\"class_type\":\"CLIPTextEncode\",\"_meta\":{\"title\":\"CLIP文本编码器\"}},\"8\":{\"inputs\":{\"samples\":[\"3\",0],\"vae\":[\"4\",2]},\"class_type\":\"VAEDecode\",\"_meta\":{\"title\":\"VAE解码\"}},\"10\":{\"inputs\":{\"images\":[\"8\",0]},\"class_type\":\"PreviewImage\",\"_meta\":{\"title\":\"预览图像\"}}}";
    public static final String UPLOAD_IMAGE_PATH = System.getProperty("user.dir") + "/src/main/resources/static/image/input/";
    //换脸插件支持的图片格式
    public static final String[] CFYUI_EXPECTED_IMAGE_EXTENSIONS = {"jpg","jpeg","png"};
    public static final String[] BAIDU_EXPECTED_IMAGE_EXTENSIONS = {"jpg","jpeg","png","bmp"};
}
